﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using CKSE.Interfaces;

namespace CKSE
{
    public class Folder : IFolder
    {
        #region Fields
        private readonly DirectoryInfo _directoryInfo;
        #endregion

        #region Properties
        public bool IsVirtual
        {
            get { return false; }
        }

        public string Name
        {
            get
            {
                return _directoryInfo.Name;
            }
        }
        public string FullPath
        {
            get
            {
                return _directoryInfo.FullName;
            }
        }

        public IFolder Parent
        {
            get { return new Folder(_directoryInfo.Parent); }
        }

        public FileInfo[] Files
        {
            get { return _directoryInfo.GetFiles(); }
        }
        #endregion

        #region Lide Cycle
        public Folder(DirectoryInfo directoryInfo)
        {
            _directoryInfo = directoryInfo;
        }
        #endregion        
    }
}
